# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>

pkgname=lftp
pkgver=4.9.2
pkgrel=1
pkgdesc="Sophisticated command line based FTP client"
arch=('x86_64')
license=('GPL3')
depends=('gcc-libs' 'readline' 'gnutls' 'expat' 'sh' 'hicolor-icon-theme')
optdepends=('perl: needed for convert-netscape-cookies and verify-file')
url="https://lftp.yar.ru/"
backup=('etc/lftp.conf')
source=(https://lftp.yar.ru/ftp/${pkgname}-${pkgver}.tar.xz{,.asc})
sha256sums=('c517c4f4f9c39bd415d7313088a2b1e313b2d386867fe40b7692b83a20f0670d'
            'SKIP')
validpgpkeys=('C027FA3148652A5513036413A824BB69F2A99A18') # "Alexander V. Lukyanov <lav@yars.free.net>"

build() {
  cd "${pkgname}"-${pkgver}
  ./configure --prefix=/usr \
    --with-gnutls \
    --without-openssl \
    --without-included-regex \
    --disable-static
  make
}

package() {
  cd "${pkgname}"-${pkgver}
  make DESTDIR="${pkgdir}" install
  rm -rf "${pkgdir}"/usr/lib
}
